]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Add SCREENSHOT_ONLY UI mode
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 15 Dec 2023 20:23:51 +0000 (17:23 -0300)
committerMarge Bot <marge-bot@gnome.org>
Thu, 21 Dec 2023 17:59:17 +0000 (17:59 +0000)
Add a screenshot-exclusive mode that makes the screencast button
unreactive, and therefore disables screencasting. It doesn't change
the visibility of the button though, as that's done by the codepath
that checks if screencasting is supported.

This will be used by the D-Bus callback to take interactive
screenshots.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>

js/ui/screenshot.js

index cfd5fbd85028f23b2e8e7d8850253cd53fd771f0..634f09feb43ad5a83e04359281bd87c913b45c31 100644 (file)
@@ -1048,6 +1048,7 @@ class UIWindowSelector extends St.Widget {
 const UIMode = {
     SCREENSHOT: 0,
     SCREENCAST: 1,
+    SCREENSHOT_ONLY: 2,
 };
 
 export const ScreenshotUI = GObject.registerClass({
@@ -1542,6 +1543,7 @@ export const ScreenshotUI = GObject.registerClass({
             return;
 
         this._castButton.checked = mode === UIMode.SCREENCAST;
+        this._castButton.reactive = mode !== UIMode.SCREENSHOT_ONLY;
 
         if (!this.visible) {
             // Screenshot UI is opening from completely closed state